package com.xfcy.blog.controller.web;

import com.xfcy.blog.annotation.BusinessLogger;
import com.xfcy.blog.common.R;
import com.xfcy.blog.service.impl.HomeServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * 前端控制器
 * @author 晓风残月Lx
 * @date 2023/4/11 13:26
 */
@RestController
@RequestMapping("/web/home")
@Api(tags = "门户首页管理")
public class WebHomeController {

    @Resource
    private HomeServiceImpl homeService;

    @RequestMapping(value = "/webSiteInfo",method = RequestMethod.GET)
    @ApiOperation(value = "网站信息", httpMethod = "GET", response = R.class, notes = "网站信息")
    public R webSiteInfo(){
        return homeService.webSiteInfo();
    }

    @RequestMapping(value = "/report",method = RequestMethod.GET)
    @ApiOperation(value = "增加网页访问量", httpMethod = "GET", response = R.class, notes = "增加网页访问量")
    public R report(HttpServletRequest request){
        return homeService.report(request);
    }

}
